package com.supermap.dataservice.rsm.entity;

import java.io.*;
import java.util.Date;

/**  
 * @Description: 产品实体类
 * @author zhoujian
 * @date 2017-12-28
 * @version V1.0 
 */
public class ProductInfo implements Cloneable , Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	//数据内容
	private String productCategory;
	//数据要素
	private String productElement;
	//数据覆盖范围
	private int productAdminCode;
	//数据日期
	private String productDate;
	//数据层次
	private String productLevel;
	//数据类别（格点数据、站点数据）
	private String productType;
	//数据时效
	private String productValid;
	//数据时间间隔
	private String productInterval;
	//数据文件类型(netcdf/json/picture)
	private String productFileType;
	//数据文件路径
	private String productFilePath;
	//数据采集时间
	private Date productCreateTime;
	//服务器信息
	private Integer productServerId;
	//数据状态
	private Integer productStatus;
	
	
	@Override
	public String toString()
	{
		
		return "productCategory = " + productCategory + ", " 
				+"prodcut";
	}
	
	
	
	public String getProductCategory()
	{
		return productCategory;
	}



	public void setProductCategory(String productCategory)
	{
		this.productCategory = productCategory;
	}



	public String getProductElement()
	{
		return productElement;
	}
	public void setProductElement(String productElement)
	{
		this.productElement = productElement;
	}
	public int getProductAdminCode()
	{
		return productAdminCode;
	}
	public void setProductAdminCode(int productAdminCode)
	{
		this.productAdminCode = productAdminCode;
	}
	public String getProductDate()
	{
		return productDate;
	}
	public void setProductDate(String productDate)
	{
		this.productDate = productDate;
	}
	public String getProductLevel()
	{
		return productLevel;
	}
	public void setProductLevel(String productLevel)
	{
		this.productLevel = productLevel;
	}
	
	public String getProductType()
	{
		return productType;
	}



	public void setProductType(String productType)
	{
		this.productType = productType;
	}



	public String getProductValid()
	{
		return productValid;
	}
	public void setProductValid(String productValid)
	{
		this.productValid = productValid;
	}
	public String getProductInterval()
	{
		return productInterval;
	}
	public void setProductInterval(String productInterval)
	{
		this.productInterval = productInterval;
	}
	public String getProductFileType()
	{
		return productFileType;
	}
	public void setProductFileType(String productFileType)
	{
		this.productFileType = productFileType;
	}
	public String getProductFilePath()
	{
		return productFilePath;
	}
	public void setProductFilePath(String productFilePath)
	{
		this.productFilePath = productFilePath;
	}
	public Date getProductCreateTime()
	{
		return productCreateTime;
	}
	public void setProductCreateTime(Date productCreateTime)
	{
		this.productCreateTime = productCreateTime;
	}
	public Integer getProductServerId()
	{
		return productServerId;
	}
	public void setProductServerId(Integer productServerId)
	{
		this.productServerId = productServerId;
	}
	
	public Integer getProductStatus()
	{
		return productStatus;
	}
	public void setProductStatus(Integer productStatus)
	{
		this.productStatus = productStatus;
	}
	/*public ProductInfo clone()
	{
		ProductInfo p = new ProductInfo();
		p.setProductAdminCode(this.productAdminCode);
		p.setProductType(this.productType);
		p.setProductCategory(this.productCategory);
		p.setProductCreateTime(this.productCreateTime);
		p.setProductDate(this.productDate);
		p.setProductElement(this.productElement);
		p.setProductFilePath(this.productFilePath);
		p.setProductFileType(this.productFileType);
		p.setProductInterval(this.productInterval);
		p.setProductLevel(this.productLevel);
		p.setProductServerId(this.productServerId);
		p.setProductValid(this.productValid);
		p.setProductStatus(this.productStatus);
		return p;
	}*/
	
	   /* 深复制 */  
    /*采用流的形式读入当前对象的二进制输入，再写出二进制数据对应的对象。*/
    public ProductInfo deepClone() throws IOException, ClassNotFoundException {  
  
        /* 写入当前对象的二进制流 */  
        ByteArrayOutputStream bos = new ByteArrayOutputStream();  
        ObjectOutputStream oos = new ObjectOutputStream(bos);  
        oos.writeObject(this);  
  
        /* 读出二进制流产生的新对象 */  
        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());  
        ObjectInputStream ois = new ObjectInputStream(bis);  
        return (ProductInfo)ois.readObject();  
    } 
	
}
